home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail-5.65 / cf / m4 / nstcpldm.m4 < prev    next >
Encoding:
Text File  |  1989-01-24  |  2.7 KB  |  95 lines

  1. divert(10)
  2. #
  3. #  Sendmail
  4. #  Copyright (c) 1983  Eric P. Allman
  5. #  Berkeley, California
  6. #
  7. #  Copyright (c) 1983 Regents of the University of California.
  8. #  All rights reserved.  The Berkeley software License Agreement
  9. #  specifies the terms and conditions for redistribution.
  10. #
  11. #    @(#)nstcpldm.m4    1.9 (Berkeley) 1/24/89
  12. #
  13. divert(0)
  14. ############################################################
  15. ############################################################
  16. #####
  17. #####        Local Domain SMTP Mailer specification
  18. #####
  19. #####    Messages processed by this specification are assumed to remain
  20. #####    the local domain.  Hence, they can refer to hosts that are
  21. #####    not registered in the NIC host table.
  22. #####
  23. ############################################################
  24. ############################################################
  25.  
  26. Mtcpld,    P=[IPC], F=mDFMueXLC, S=17, R=27, A=IPC $h, E=\r\n
  27.  
  28. S17
  29.  
  30. # cleanup forwarding a bit
  31. R$*<$*>$*        $1$2$3                defocus
  32. R$*            $:$>3$1                canonicalize
  33. R$*%$*<@$w>        $:$>9$1%$2            user%localhost@localdomain
  34.  
  35. # pass <route-addr>'s through
  36. R<@$+>$*        $@<@$[$1$]>$2            resolve <route-addr>
  37.  
  38. # map colons to dots everywhere
  39. R$*:$*            $1.$2                map colons to dots
  40.  
  41. # output local host as user@host.domain
  42. R$-            $@$1<@$w>            user w/o host
  43. R$+<@$w>        $@$1<@$w>            this host
  44. R$+<@$=w>        $@$1<@$w>            or an alias
  45. R$+<@$->        $:$1<@$[$2$]>            ask nameserver
  46. R$+<@$w>        $@$1<@$w>            this host
  47. R$+<@$->        $@$1<@$2.$D>            if nameserver fails
  48.  
  49. # if not local, and not a "fake" domain, ask the nameserver
  50. R$+<@$+.$~I>        $@$1<@$[$2.$3$]>        user@host.domain
  51. R$+<@[$+]>        $@$1<@[$2]>            already ok
  52.  
  53. # output fake domains as user%fake@relay
  54.  
  55. ifdef(`BITNET_RELAY',
  56. R$+<@$+.BITNET>        $@$1%$2.BITNET<@$B>        user@host.bitnet)
  57. ifdef(`CSNET_RELAY',
  58. R$+<@$+.CSNET>        $@$1%$2.CSNET<@$C>        user@host.CSNET)
  59. R$+<@$+.UUCP>        $@$2!$1<@$w>            user@host.UUCP
  60.  
  61.  
  62. S27
  63.  
  64. # cleanup
  65. R$*<$*>$*        $1$2$3                defocus
  66. R$*            $:$>3$1                now canonical form
  67. R$*%$*<@$w>        $:$>9$1%$2            user%localhost@localdomain
  68.  
  69. # pass <route-addr>'s through
  70. R<@$+>$*        $@<@$[$1$]>$2            resolve <route-addr>
  71.  
  72. # map colons to dots everywhere
  73. R$*:$*            $1.$2                map colons to dots
  74.  
  75. # output local host as user@host.domain
  76. R$-            $@$1<@$w>            user w/o host
  77. R$+<@$w>        $@$1<@$w>            this host
  78. R$+<@$=w>        $@$1<@$w>            or an alias
  79. R$+<@$->        $:$1<@$[$2$]>            ask nameserver
  80. R$+<@$w>        $@$1<@$w>            this host
  81. R$+<@$->        $@$1<@$2.$D>            if nameserver fails
  82.  
  83. # if not local, and not a "fake" domain, ask the nameserver
  84. R$+<@$+.$~I>        $@$1<@$[$2.$3$]>        user@host.domain
  85. R$+<@[$+]>        $@$1<@[$2]>            already ok
  86.  
  87. # output fake domains as user%fake@relay
  88.  
  89. ifdef(`BITNET_RELAY',
  90. R$+<@$+.BITNET>        $@$1%$2.BITNET<@$B>        user@host.BITNET)
  91. ifdef(`CSNET_RELAY',
  92. R$+<@$+.CSNET>        $@$1%$2.CSNET<@$C>        user@host.CSNET)
  93. R$+<@$+.UUCP>        $@$2!$1                user@host.UUCP
  94.  
  95.